package com.wzq;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author wzq.Jolin
 * @company none
 * @create 2020-08-09 19:03
 */
@Controller
@EnableCaching
@EnableRedisHttpSession
@SpringBootApplication
public class SessionApplication extends SpringBootServletInitializer {
    public static void main(String[] args) {
        SpringApplication.run(SessionApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(SessionApplication.class);
    }

    @GetMapping("/")
    public String index() {
        return "index";
    }
}
